import { Component, Input } from '@angular/core';
import { ActiveTitleService } from './services/active-title.service';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})

export class AppComponent {
  @Input() comTitle = 'ng';
  constructor(activeTitleService: ActiveTitleService) {
    // 使用服务
    const aa = activeTitleService.reqApi('/template_type');
    aa.subscribe( res => {
        console.log(res);
    }, err => {
        console.log(err);
    });
  }
}
